# -*- coding: utf-8 -*-
# @Time    : 2024/8/29 0:26
# @Author  : Alvin
# @File    : majors.py


from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import Relationship

from app.models.base import Base


class Major(Base):
    __tablename__ = 'majors'
    colleges = Relationship('College')
    major_id = Column(Integer, primary_key=True)
    major_name = Column(String(100), nullable=False)
    college_id = Column(Integer, ForeignKey('colleges.college_id'))
    # description = Column(Text)
